import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  namespaced: true,
  state: {
    bgColor: "#ff694d",
  },
  getters: {},
  mutations: {
    changecolor(state) {
      var rand = Math.floor(Math.random() * 0xffffff).toString(16);
      state.bgColor = "#" + rand;
      console.log(state.bgColor);
    },
  },
  actions: {},
  modules: {},
});
